package hcn.protocol.brandnew.dengji.bingli;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import lombok.Data;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;
import java.util.List;


/**
 * 住院病历信息查询-响应消息(成功） - ODS_02100002_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class AdmissionNoteResponse {

    /**
     * 住院病历List
     */
    @XmlElementWrapper(name = "RequestLists")
    @XmlElement(name = "RequestList")
    private List<RequestList> requestLists;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class RequestList {

        /**
         * 医院ID，医院系统身份标识
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 住院号
         */
        @XmlElement(name = "VisitId")
        private String visitId;
        /**
         * 病历编号
         */
        @XmlElement(name = "MedicalRecordId")
        private String medicalRecordId;
        /**
         * 病历类别编号
         */
        @XmlElement(name = "MedicalClassId")
        private String medicalClassId;
        /**
         * 病历类别名称
         */
        @XmlElement(name = "MedicalClassName")
        private String medicalClassName;
        /**
         * 模板类别编号
         */
        @XmlElement(name = "TemplateClassId")
        private String templateClassId;
        /**
         * 模板类别名称
         */
        @XmlElement(name = "TemplateClassName")
        private String templateClassName;
        /**
         * 病历名称
         */
        @XmlElement(name = "MedicalRecordName")
        private String medicalRecordName;
        /**
         * 病历html地址
         */
        @XmlElement(name = "WebAddress")
        private String webAddress;
        /**
         * 病历html地址
         */
        @XmlElement(name = "MedicalRecordWebAddress")
        private String medicalRecordWebAddress;
        /**
         * 记录日期时间
         */
        @XmlElement(name = "RecorderDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date recorderDateTime;
    }

}
